package com.hyj.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.hyj.entity.Messages;
import com.hyj.service.MessagesService;

@Controller
public class MessageSController {
	@Autowired
	private MessagesService messagesService;
	
	@RequestMapping(value = "/selectMyMessages", method = RequestMethod.POST)
	@ResponseBody 
	public List<Messages> selectMyMessages(Integer uid) {
		System.out.println(uid);
		List<Messages> selectMyMessages = messagesService.selectMyMessages(uid);
		// TODO Auto-generated method stub
		System.out.println(selectMyMessages);
		return selectMyMessages;
	}

	@RequestMapping(value = "RomoveMessages", method = RequestMethod.POST)
	@ResponseBody
	public Integer RomoveMessages(Integer uid) {
		// TODO Auto-generated method stub
		return messagesService.RomoveMessages(uid);
	}
	
	

}
